﻿using Microsoft.Xna.Framework;

namespace Z2.Core
{

	public class Apple : ItemBase
	{

		#region Const

		private const string Graphics = "apple";

		#endregion

		#region Constructor

		public Apple()
			: base(SpriteManager.Instance.LoadSprite(Apple.Graphics, 1, 1, ItemBase.Group))
		{
			this.Score = 10;
			this.ParticleSettings.Power = new Vector2(5, 10);
			this.ParticleSettings.Ammount = 5;
			this.ParticleSettings.Type = ParticleType.StarRed;
		}

		#endregion

		#region Override Methods
		
		protected override void OnPickUp()
		{
			base.OnPickUp();
			ParticleEngine.Instance.Create(this.Position, this.ParticleSettings);
			SoundManager.Instance.PlayDistance(ItemBase.Pops[RandomGenerator.Random.Next(1, 4)], this);
		}

		#endregion

	}
}
